#ifndef __GRAYTRACK_H
#define __GRAYTRACK_H

#include "stm32f10x.h"
#include "Pins.h"

#define ReadA(pin) GPIO_ReadInputDataBit(GPIOA, pin)
#define ReadB(pin) GPIO_ReadInputDataBit(GPIOB, pin)

#define D1 ReadB(OUT1)
#define D2 ReadB(OUT2)
#define D3 ReadA(OUT3)
#define D4 ReadA(OUT4)
#define D5 ReadA(OUT5)
#define D6 ReadA(OUT6)
#define D7 ReadA(OUT7)
#define D8 ReadA(OUT8)

void GrayTrack_Init(void);
void GrayTrack_Track(void);

#endif
